package com.zzq.guli.service.base.handler;

import com.zzq.guli.service.base.result.R;
import com.zzq.guli.service.base.result.ResultCodeEnum;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GlobalExceptionHandler {


    @ExceptionHandler(IllegalAccessError.class)
       @ResponseBody
       public R error(Exception e){
           e.printStackTrace();
           return R.error();
       }


       @ExceptionHandler()
       public R exception(Exception e){



        return R.error();
       }

}
